/**
 * 全息档案仓库
 * @type {{holographicArchives: {}}}
 */

const state = {
  /*
  出所衔接空间拓展
  currentStage
   */
  currentStage:0,

  holographicArchives:{},//综合信息集
  routeObjData:{},//路由信息集
  /*
  routeObjData对照：
  sjskId:个案id
  sjskCode：个案编号
  sjskPhone：人员电话
  sjskIdentity：身份证
  personStage：sjsk类型 1监所，2个案，3社会面
   */
  serialString:{},//查询键值
  /*
  serialString字段对照:
   */
  varied:{}//备用数据
  /*
  varied字段对照
   */
};
const mutations = {
  currentStage(state,categoryList){
    state.currentStage = categoryList
    console.log(state.currentStage)
  },

  HAF(state,categoryList){
    // state.holographicArchives = categoryList;
    state.holographicArchives = Object.assign(state.holographicArchives,categoryList);
  },
  ROF(state,categoryList){
    state.routeObjData = categoryList
  },
  IDSF(state,categoryList){
    state.serialString = Object.assign(state.serialString,categoryList)
  },
  VF(state,categoryList){
    state.varied = Object.assign(state.varied,categoryList)
  }
};
const actions = {
  categoryListFun({commit},data){
    console.log(data)
    if(data){
      commit('currentStage',data)
    }
  },


  holographicArchivesFun({commit},data){
    if(data){
      commit('HAF',data)
    }
  },
  routeObjDataFun({commit},data){
    if(data){
      commit('ROF',data)
    }
  },
  serialStringFun({commit},data){
    if(data){
      commit('IDSF',data)
    }
  },
  variedFun({commit},data){
    if(data){
      commit('VF')
    }
  },
  personStageFun(){}

};
const getters = {};

export default {
  state,
  mutations,
  actions,
  getters
}